-- Demonstration: Filtering Data

-- Example 1
USE AdventureWorks2008
GO
SELECT SalesOrderNumber, OrderDate, SubTotal, TaxAmt, Freight, TotalDue
FROM Sales.SalesOrderHeader
WHERE SubTotal < 50

-- Example 2
USE AdventureWorks2008
GO
SELECT SalesOrderNumber, OrderDate, SubTotal, TaxAmt, Freight, TotalDue
FROM Sales.SalesOrderHeader
WHERE SubTotal > 100000

-- Example 3
USE AdventureWorks2008
GO
SELECT SalesOrderNumber, OrderDate, SubTotal, TaxAmt, Freight, TotalDue
FROM Sales.SalesOrderHeader
WHERE OrderDate BETWEEN '20010701' AND '20010731'

--Example 4
USE AdventureWorks2008
GO
SELECT SalesOrderNumber, OrderDate, SubTotal, TaxAmt, Freight, TotalDue
FROM Sales.SalesOrderHeader
WHERE OrderDate >= '20010701' AND OrderDate <= '20010731'
